package com.mayisoftware.mayioa.web;
import com.mayisoftware.mayioa.common.impl.config.Global;
import com.mysql.cj.x.protobuf.MysqlxDatatypes;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;


//扫描Service
@ComponentScan(basePackages = { "com.mayisoftware.mayioa.**" })
//扫描Mapper
@MapperScan(basePackages = {"com.mayisoftware.mayioa.**.impl.**"})
//@ServletComponentScan 注解后，Servlet、Filter、Listener 可以直接通过 @WebServlet、@WebFilter、@WebListener 注解自动注册
//@ServletComponentScan(basePackages = {"com.mayisoftware.mayioa.*.impl.*"})
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
public class Application {
    private final static Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) {
        logger.info("开始启动服务mayioa");
        SpringApplication.run(Application.class, args);

        Global.createAllDefaultDirs();
        logger.info("完成启动mayioa服务");
    }


}
